package com.culturalCenter.dataCenter.constant;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 请求头认证常量类
 *
 * @author zhao
 * @date 2021/10/12
 */
@Component
public class AuthConstants {

    // 请求头
    public final static String ACC_APPID = "acc_appid";
    public final static String ACC_APPKEY = "acc_appkey";
    public final static String ACC_TIMES = "acc_times";
    public final static String ACC_TOKEN = "acc_token";

    /**
     * 请求超时时间, 单位: 毫秒 ,60 * 60 * 1000 = 一小时的毫秒数
     */
    @Getter
    public static Integer REQUEST_TTL;

    @Value("${request-timeout}")
    public void setTimeout(Integer timeout) {
        AuthConstants.REQUEST_TTL = timeout;
    }

}
